//客户端类：想上网，插不上网线
public class Computer {
    public void net(Adapter2 adapter){
        //上网的具体实现，找一个转接头
        adapter.handleRequest();//可以上网
    }

/*    public static void main(String[] args) {
        Computer computer = new Computer();
        Adapter adapter = new Adapter();
        Adaptee adaptee = new Adaptee();
        computer.net(adapter);
    }*/

    public static void main(String[] args) {
        Computer computer = new Computer();
        Adaptee adaptee = new Adaptee();
        Adapter2 adapter = new Adapter2(adaptee);
        computer.net(adapter);
    }
}
